<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title id="doctitle">topic</title>
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Expires" content="-1">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta content="telephone=no" name="format-detection"/>
    <meta name="screen-orientation" content="portrait">
    <!-- uc强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <link rel="icon" href="favicon.ico" type="image/x-icon">
    <!-- Bootstrap -->
    <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-theme.min.css">
    <link rel="stylesheet" type="text/css" href="css/base.css">
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <link rel="stylesheet" type="text/css" href="css/special.css">
    <link rel="stylesheet" href="css/mx-bubble.css" type="text/css" />
    <link rel="stylesheet" href="css/bubbles.css" type="text/css" />
    <!-- Bootstrap Js -->
    <script src="js/jquery-1.10.2.min.js"></script>
    <script src="bootstrap/js/respond.min.js"></script>
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <script src="js/echarts/echarts.js"></script>
    <script src="js/common.js"></script>
    <script src="json/specialTopic.js"></script>
    <script src="js/jquery-plugins/jquery.tmpl.min.js"></script>
    <script src="js/jquery-plugins/jquery.tmplPlus.min.js"></script>
    
    <!-- yuxi.file -->
    <link rel="stylesheet" type="text/css" href="css/yuxi.css">
    <script src="js/yuxi.js"></script>
    
    <script src="js/page.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/html2canvas.js"></script>
    <script type="text/javascript" src="js/basic.js"></script>
    <script type="text/javascript" src="js/jspdf.debug.js"></script>
    
     <script>
     $(function(){
    	 require.config({
    	        paths: {
    	            echarts: 'js/echarts'
    	        }
    	    });
    	 //初始化专题信息
    	 loadTop();
    	 //获取专题关键词和关联关键词
    	 getTopicKeywords();
    	  //获取专题资讯汇总数量
    	 getTopicNum();
     	//初始化page对象
		page.init();
        initeChart();
     	//观点分析
     	//requestOption(GetQueryString('id'));
     	//专题资讯列表
     	initArticles();
     	
     });
     
     function loadTop(){
     	var prefix = localStorage.localIP;
 		var url = "/inter/querySubjectList";
 		var sUrl = prefix + url + '.json';
         $.ajax({
              url : sUrl,
              type : "post",
              dataType:'json',
              data : {
                  id : GetQueryString('id')
              },
              success : function(data) {
                  if(data && data != ""){
                      var result =  eval('(' + data + ')');
                      if(result.error){
                          alert(result.error);
                      } else{
                          if(result.ret == 0) {
                             var list = result.data;
                             for(var i = 0; i < list.length; i++){
                 				var obj = list[i];
                 		        //for(var e in obj){
                 		        	//var o = obj[e];
                 		        	//if(o.id == GetQueryString('id')){
 	                				var title = obj.title;
 	        		        		var len = 10;
 	    		        			if(title && title.length > len){
 	    		        				title = title.substring(0,len);
 	    		        				var reg = /^0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z$/;
 	    		        				var arr = title.split("");
 	    		        				if(arr){
 	    		        					var count = 0;
 	    		        					arr.forEach(function(val){
 	    		        						if(reg.test(val)){
 	    		        							count++;
 	    		        						}
 	    		        					});
 	    		        				}
 	    		        				len = len + count;
 	    		        				if(obj.title.length > len){
 	    		        					title = obj.title.substring(0,len) + "...";
 	    		        				} else{
 	    		        					title = obj.title;
 	    		        				}
 	    		        			}
                 		        	$('#topicTitle').html(title);
                 		        	$('#topicTitle1').html(obj.title);
                 		        	$('#topicTitle2').html(obj.title);
                 		        	$('#topicTitle3').html(obj.title);
                 		        	$('#topicTitle4').html(obj.title);
                 		        	$('#topicTitle5').html(obj.title);
                 		        	$('#topicTitle6').html(obj.title);
                 		        	$('#topicTitle7').html(obj.title);
                 		        	$('#topicTitle8').html(obj.title);
                 		        	$('#topicTitle9').html(obj.title);
                 		        	$('#topicTitle10').html(obj.title);
                 		        	$('#topicStrattime').html(obj.starttime);
                 		        	$('#topicEndtime').html(obj.terminaltime);
                 		        	$('#topicStrattime1').html(obj.starttime);
                 		        	$('#topicEndtime1').html(obj.terminaltime);
                 		        	$('#topicStrattime2').html(obj.starttime);
                 		        	$('#topicEndtime2').html(obj.terminaltime);
                 		        }
                 			}else{
                 				alert(result.msg);
                 			}
                      }
                  }
                  //var i=1;
                  $('#indexTranButton').click(function(){
                  //var ele = $(this).parents("#tranTxt");
                  //translate();
                  var srcl;
                  var tgtl;
                  $.ajax({
          			url : 'http://translateport.yeekit.com:9006/detection',
          			type : "post",
          			dataType:'jsonp',
          			jsonp:'jsoncallback',
          			crossDomain: true,
          			data : {
          				text : $('#topicTitle').html()
          			},
          			success : function(data) {
          				if(data.result){
          					if(data.result == 'zh'){
          						srcl = "zh";
          						tgtl = "en";
          					}else if(data.result == 'en'){
          						srcl = "en";
          						tgtl = "zh";
          					}else{
          						srcl = "en";
          						tgtl = "zh";
          					}
          				}
          				transBtnClick(srcl,tgtl);
          			},
          			error : function(XMLHttpRequest, textStatus, errorThrown) {
         			}
              	});
              	});
              },
              error : function(XMLHttpRequest, textStatus, errorThrown) {
                   //alert('系统出现未知异常，请联系系统管理员！');
              }
          });
     }
              
     function getTopicKeywords(){
    	 var json = {
    	    		"id":GetQueryString('id')
    	    	};
    		
    		hmProxy('topic/topicWordtoWord', json, function(data, textStatus, jqXHR){
    			data = eval("("+data+")");
    			if(data && data.ret == 0){
    				var list = data.data;
    				if(list && list.length > 0){
    					var keywords;
    					var relateKeywords;
    					for(var i = 0; i < list.length; i++){
    						if(i == 0){
    							keywords = list[i].topicword;
    							relateKeywords = (list[i].words)[0].word;
    						}else if(i < 5){
    							keywords += "," + list[i].topicword;
    							relateKeywords += "," + (list[i].words)[0].word;
    						}else if(i == 5){
    							keywords += "...";
    							relateKeywords += "...";
    						}
    					}
    					$('#keywords').html(keywords);
    					$('#relatekeywords').html(relateKeywords);
    					$('#relateKeywordsView').html(relateKeywords+"等");
    				}
    			}
    		});
     }
     
     function getTopicNum(){
    	 var json = {
    	    		"id":GetQueryString('id')
    	    	};
    		
    		hmProxy('topic/topicSum', json, function(data, textStatus, jqXHR){
    			data = eval("("+data+")");
    			if(data && data.ret == 0){
    				var obj = data.data;
   					$('#stationNum').html(obj.station);
   					$('#languageNum').html(obj.language);
   					$('#mediaNum').html(obj.media);
   					$('#subjectsNum').html(obj.abroad);
   					$('#twitterNum').html(obj.twitter);
    			}
    		});
     }
     
     
     
     function initeChart(){
    	 	var json = {
    				"id":GetQueryString('id')
    			};
    	 	//国家报道数据分布图
 			hmProxy('topic/topicStations', json, function(data, textStatus, jqXHR){
 				data = eval("("+data+")");
 				if(data && data.ret == 0){
 					var list = data.data;
 					if(list && list.length > 0){
 						var legendArr = new Array();
 						var seriesArr = new Array();
 						for(var i = 0; i < 8; i++){
 							var obj = list[i];
 							legendArr.push(obj.nation);
 							var o = new Object();
 							o.name = obj.nation;
 							o.type = 'bar';
 							o.data = [obj.quantity];
 							seriesArr.push(o);
 							if(i<5){
 								$('#topicStation'+i).html(obj.nation);
 								$('#topicQuantity'+i).html(obj.quantity);
 							}
 						}
 						
 						require(
 					         [
 					             'echarts',
 					             'echarts/chart/bar'
 					         ],
 					         function (ec) {
 					        	 var myChart = ec.init(document.getElementById('topicBar'));
 					        	 option = {
 			        			    title : {
 			        			        text: '',
 			        			        subtext: ''
 			        			    },
 			        			    tooltip : {
 			        			        trigger: 'axis'
 			        			    },
 			        			    legend: {
 			        			        data:legendArr
 			        			    },
 			        			    calculable : true,
 			        			    xAxis : [
 			        			        {
 			        			            type : 'category',
 			        			            data : ['']
 			        			        }
 			        			    ],
 			        			    yAxis : [
 			        			        {
 			        			            type : 'value'
 			        			        }
 			        			    ],
 			        			    series : seriesArr
 			        			};
 					        	 myChart.setOption(option);
 					         }
 						);
 					}
 					
 				}
 			});
    	 	
    	 	
 			//媒体资讯走势图
 			hmProxy('topic/topicTrend', json, function(data, textStatus, jqXHR){
 				data = eval("("+data+")");
 				if(data && data.ret == 0){
 					var list = data.data;
 					if(list && list.length > 0){
 						var xAxisArr = new Array();
 						var seriesArr = new Array();
 						var allQuantity = 0;
 						for(var i = list.length-1; i >= 0; i--){
 							var obj = list[i];
 							xAxisArr.push(obj.day);
 							seriesArr.push(obj.quantity);
 							if(i == list.length-1){
 								$('#firstQuantity').html(obj.quantity);
 							}
 							allQuantity = parseInt(allQuantity) + parseInt(obj.quantity);
 							
 						}
 						$('#LastQuantity').html(allQuantity);
 						require(
 					         [
 					             'echarts',
 					             'echarts/chart/line'
 					         ],
 					         function (ec) {
 					        	 var myChart = ec.init(document.getElementById('topicPie'));
 					        	 option = {
 			        			    tooltip : {
 			        			        trigger: 'axis'
 			        			    },
 			        			    legend: {
 			        			        data:[]
 			        			    },
 			        			    calculable : true,
 			        			    xAxis : [
 			        			        {
 			        			            type : 'category',
 			        			            boundaryGap : false,
 			        			            data : xAxisArr
 			        			        }
 			        			    ],
 			        			    yAxis : [
 			        			        {
 			        			            type : 'value'
 			        			        }
 			        			    ],
 			        			    series : [
 			        			        {
 			        			            name:'检测总量',
 			        			            type:'line',
 			        			            stack: '总量',
 			        			            data: seriesArr
 			        			        }
 			        			    ]
 			        			};
 					        	 myChart.setOption(option);
 					         }
 					    );
 					}
 				}
 			});
 			
 			//媒体类型统计图
 			hmProxy('topic/topicType', json, function(data, textStatus, jqXHR){
 				data = eval("("+data+")");
 				if(data && data.ret == 0){
 					var list = data.data;
 					if(list && list.length > 0){
 						var legendArr = new Array();
 						var seriesArr = new Array();
 						list.forEach(function(obj){
 							legendArr.push(obj.type);
 							var o = new Object();
 							o.name = obj.type;
 							//小数的话 * 100
 							//o.value = obj.rate * 100;
 							//个数的话，直接复制
 							o.value = obj.rate;
 							//o.value = obj.rate.substr(0, obj.rate.length-1);
 							seriesArr.push(o);
 							
 							if(obj.type == "新闻"){
 								$('#newmedia').html(obj.rate + "%");
 							}else if(obj.type == "论坛"){
 								$('#forummedia').html(obj.rate  + "%");
 							}else if(obj.type == "博客"){
 								$('#bokemedis').html(obj.rate  + "%");
 							}else if(obj.type == "Twitter"){
 								$('#twittermedia').html(obj.rate  + "%");
 							}else if(obj.type == "平媒"){
 								$('#pingmianmedia').html(obj.rate  + "%");
 							}
 						});
 						
 						require(
 					         [
 					             'echarts',
 					             'echarts/chart/pie'
 					         ],
 					         function (ec) {
 					        	 var myChart = ec.init(document.getElementById('mediachart'));
 					        	 option = {
 				            		    title : {
 				            		        text: '',
 				            		        subtext: '',
 				            		        x:'center'
 				            		    },
 				            		    tooltip : {
 				            		        trigger: 'item',
 				            		        //小数和百分比
 				            		        //formatter: "{a} <br/>{b} : {c}%"
 				            		        //个数
 				            		        formatter: "{a} <br/>{b} : {c} ({d}%)"
 				            		    },
 				            		    legend: {
 				            		        orient : 'vertical',
 				            		        x : 'left',
 				            		        data: legendArr
 				            		    },
 				            		    calculable : true,
 				            		    series : [
 				            		        {
 				            		            name:'',
 				            		            type:'pie',
 				            		            radius : '55%',
 				            		            center: ['50%', '60%'],
 				            		           	clockWise:false,
 				            		            data: seriesArr
 				            		        }
 				            		    ]
 				            	};
 					        	 myChart.setOption(option);
 					         }
 					    );
 					}
 				}
 			});
 			
 			//多语言对比分析
 			hmProxy('topic/topicLanguage', json, function(data, textStatus, jqXHR){
 				data = eval("("+data+")");
 				if(data && data.ret == 0){
 					var list = data.data;
 					if(list && list.length > 0){
 						var legendArr = new Array();
 						var seriesArr = new Array();
 						var languageTxt = "";
 						list.forEach(function(obj){
 							if(obj.rate != '0' ){
	 							legendArr.push(obj.language);
	 							var o = new Object();
	 							o.name = obj.language;
	 							o.value = obj.rate;
	 							seriesArr.push(o);
	 							languageTxt += "," + obj.language+"占"+obj.rate+"%";
	 							
 							}
 							//if(obj.language == "简体中文"){
 							//	$('#chineseNum').html(obj.rate + "%");
 							//}else if(obj.language == "繁体中文"){
 							//	$('#fanchineseNum').html(obj.rate + "%");
 							//}else if(obj.language == "英语"){
 							//	$('#englishNum').html(obj.rate + "%");
 							//}else if(obj.language == "俄语"){
 							//	$('#russiaNum').html(obj.rate + "%");
 							//}else if(obj.language == "韩语"){
 							//	$('#koreaNum').html(obj.rate + "%");
 							//}
 						});
 						$('#languageTxt').append(languageTxt+"。");
 						require(
 					         [
 					             'echarts',
 					             'echarts/chart/pie'
 					         ],
 					         function (ec) {
 					        	 var myChart = ec.init(document.getElementById('comparelanguage'));
 					        	 option = {
 			            		    title : {
 			            		        text: '',
 			            		        subtext: '',
 			            		        x:'center'
 			            		    },
 			            		    tooltip : {
 			            		        trigger: 'item',
 			            		        formatter: "{a} <br/>{b} : {c} ({d}%)"
 			            		    },
 			            		    legend: {
 			            		        orient : 'vertical',
 			            		        x : 'left',
 			            		        data:legendArr
 			            		    },
 			            		    calculable : true,
 			            		    series : [
 			            		        {
 			            		            name:'',
 			            		            type:'pie',
 			            		            radius : '55%',
 			            		            center: ['50%', '60%'],
 			            		            clockWise:false,
 			            		            data:seriesArr
 			            		        }
 			            		    ]
 			            		}; 
 					        	 myChart.setOption(option);
 					         }
 					   );
 					}
 				}
 			});
 			
 			//媒体报道数据分布
 			hmProxy('topic/mediaCoverage', json, function(data, textStatus, jqXHR){
        		data = eval("("+data+")");
        		if(data && data.ret == 0){
        			var list = data.data;
        			if(list && list.length > 0){
        				var names = new Array();
        				var datas = new Array();
        				for(var i = 0; i < list.length; i++){
        					var obj = list[i];
        					names.push(obj.site_name);
        					datas.push(obj.quantity);
        					if( i < 5 ){
        						$('#mediasitename'+i).html(obj.site_name);
        						$('#mediaquantity'+i).html(obj.quantity);
        					}
        				};
        				require(
                            [
                                'echarts',
                                'echarts/chart/bar'
                            ],
                            function (ec) {
                                var myChart = ec.init(document.getElementById('mediaData'));
                                var option = {
                            	    tooltip : {
                            	        trigger: 'axis',
                            	        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                            	            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                            	        }
                            	    },
                            	    legend: {
                            	        show : false,
                            	        data:['直接访问'],
                            	        padding:[25,0,0,0]
                            	    },
                            	    toolbox: {
                            	        show : false,
                            	        feature : {
                            	            mark : {show: true},
                            	            dataView : {show: true, readOnly: false},
                            	            magicType : {show: true, type: ['tiled']},
                            	            restore : {show: true},
                            	            saveAsImage : {show: true}
                            	        }
                            	    },
                            	    calculable : true,
                            	    grid:{
                            	        //show : false,
                            	        borderWidth: 0,
                            	    },
                            	    xAxis : [
                            	        {
                            	            show : false,
                            	            type : 'value'
                            	        }
                            	    ],
                            	    yAxis : [
                            	        {
                            	            show : true,
                            	            type : 'category',
                            	            data : names,
                            	            axisLine:{
                            	                show : false
                            	            },
                            	            axisLabel:{
                            	                show : true
                            	            },
                            	            splitLine:{
                            	                show : false
                            	            },
                            	            axisTick:{
                            	                show : false
                            	            }

                            	        }
                            	    ],
                            	    axis:{
                            	        axisLabel:{
                            	            show : true
                            	        }
                            	    },
                            	    series : [	
                            	        {
                            			    barWidth:25,
                            				barHeight:25,
                            	            name:'直接访问',
                            	            type:'bar',
                            	            stack: '总量',
                            	            itemStyle : {
                            					 normal:{
                            						 barBorderRadius:[0,40,40,0],
                            				         color: function(params) {
                            	                        var colorList = [
                            	                          '#a7c1e3','#a7c1e3','#568bce','#568bce','#5cce56',
                            	                          '#a7c1e3','#a7c1e3','#568bce','#568bce','#5cce56',
                            	                        ];
                            	                        return colorList[params.dataIndex]
                            	                    },
                       	                    label : {show: true, position: 'insideLeft'}}},
                                            data:datas
                                        }
                                    ]
                                };
                                myChart.setOption(option);
                            }
                        );
        			}
        		}
        	});
 			
 			// 正负面信息比例
 			hmProxy('topic/side', json, function(data, textStatus, jqXHR){
        		data = eval("("+data+")");
        		if(data && data.ret == 0){
        			var data = data.data;
        			if(data){
        				var names = new Array();
        				var datas = new Array();
        				names.push({"value":data.positive, "name" : ("Positive "+data.positiverate+"%")});
        				names.push({"value":data.negative, "name" : ("Negative "+data.negativerate+"%")});
        				datas.push({"value":data.positive, "name" : "Positive"});
        				datas.push({"value":data.negative, "name" : "Negative"});
        				$('#positiverate').html(data.positiverate+"%");
        				$('#negativerate').html(data.negativerate+"%");
        				 require(
                                 [
                                     'echarts',
                                     'echarts/chart/pie'
                                 ],
                                 function (ec) {
                                     var myChart = ec.init(document.getElementById('topicside'));
                                     var option = {
                                             tooltip : {
                                                 trigger: 'item',
                                                 formatter: "{a} <br/>{b} : {c} ({d}%)"
                                             },
                                             calculable : false,
                                             series : [

                                                 {
                                                     name:'',
                                                     type:'pie',
                                                     selectedMode: 'single',
                                                     radius : [0, 90],

                                                     // for funnel
                                                     x: '20%',
                                                     width: '40%',
                                                     funnelAlign: 'right',
                                                     max: 1548,

                                                     itemStyle : {
                                                         normal : {
                                                             label : {
                                                                 position : 'inner'
                                                             },
                                                             labelLine : {
                                                                 show : false
                                                             }
                                                         }
                                                     },
                                                     data:names
                                                 },
                                                 {
                                                     name:'',
                                                     type:'pie',
                                                     clockWise:true,
                                                     radius : [100, 140],

                                                     // for funnel
                                                     x: '60%',
                                                     width: '35%',
                                                     funnelAlign: 'left',
                                                     max: 1048,

                                                     data:datas
                                                 }
                                             ]
                                         };
                                         myChart.setOption(option);
                                 }
                         );
        			}
        		}
        	});
 			
 			// 观点分析
 			hmProxy('topic/opinion', json, function(data, textStatus, jqXHR){
        		data = eval("("+data+")");
        		if(data && data.ret == 0){
        			var list = data.data;
        			if(list && list.length > 0){
        				var positive = new Array();
        				var negative = new Array();
        				list.forEach(function(obj){
        					//负面
        					if(obj.side == '-1'){
        						obj.side = '负面';
        						negative.push(obj);
        					}
        					//正面
        					else if(obj.side == '1'){
        						obj.side = '正面';
        						positive.push(obj);
        					}
        				});
        				var titleHtml = "";
        				if(positive.length > 0){
        					titleHtml = "<div class='xiguandian' style='font-size: 16px; font-weight: bold; color: blue;'>正面<div>";
        					$(titleHtml).appendTo('#optionanysi');
        					var count = 0;
        					for(var i = 0; i < 3; i++){
        						var obj = positive[i];
        						count++;
        						obj.index = count;
        						$('#topicPointsTemplate').tmpl(obj).appendTo('#optionanysi');
        					};
        				}
        				if(negative.length > 0){
        					titleHtml = "<div class='xiguandian' style='font-size: 16px; font-weight: bold; color: blue;'>负面<div>";
        					$(titleHtml).appendTo('#optionanysi');
        					var count = 0;
        					for(var i = 0; i < 3; i++){
        						var obj = negative[i];
        						count++;
        						obj.index = count;
        						$('#topicPointsTemplate').tmpl(obj).appendTo('#optionanysi');
        					};
        				}
        			}
        		}
        	});
     }
     
     // 初始化专题资讯列表
     function initArticles(){
    	 var prefix = localStorage.localIP;
 		var url = "/inter/queryArticlesView";	
 		var sUrl = prefix + url + '.json';
         $.ajax({
              url : sUrl,
              type : "post",
              dataType:'json',
              data : {
                  id : GetQueryString('id'),
                  page : page.getPageCount(),
                  size : page.getSize()
              },
              success : function(data) {
                  if(data && data != ""){
                      var result =  eval('(' + data + ')');
                      if(result.error){
                          alert(result.error);
                      } else{
                          if(result.ret == 0) {
                             var list = result.data;
                             if(list && list.length > 0){
                             	var newsArr = new Array();
                                 var forumArr = new Array();
                                 var bloggerArr = new Array();
                                 var flatMediaArr = new Array();
                                 var twitterArr = new Array();
                                 var snsArr = new Array();
                                 var otherArr = new Array();
                                 
                                 list.forEach(function(obj){
                                 	if(obj.media_type == "新闻"){
                                 		newsArr.push(obj);
                                 	} else if(obj.media_type == "论坛"){
                                 		forumArr.push(obj);
                                 	} else if(obj.media_type == "博客"){
                                 		bloggerArr.push(obj);
                                 	} else if(obj.media_type == "平媒"){
                                 		flatMediaArr.push(obj);
                                 	} else if(obj.media_type == "Twitter"){
                                 		twitterArr.push(obj);
                                 	} else if(obj.media_type == "SNS"){
                                 		snsArr.push(obj);
                                 	} else if(obj.media_type == "其他"){
                                 		otherArr.push(obj);
                                 	}
                                 });
                                 
                                 if(newsArr && newsArr.length > 0){
                                 	$("<button>新闻</button>").appendTo('#newsList');
                                 	$('#newsListTemplate').tmpl(newsArr).appendTo('#newsList');
                                 }
                                 if(forumArr && forumArr.length > 0){
                                 	$("<button>论坛</button>").appendTo('#newsList');
                                 	$('#newsListTemplate').tmpl(forumArr).appendTo('#newsList');
                                 }
                                 if(bloggerArr && bloggerArr.length > 0){
                                 	$("<button>博客</button>").appendTo('#newsList');
                                 	$('#newsListTemplate').tmpl(bloggerArr).appendTo('#newsList');
                                 }
                                 if(flatMediaArr && flatMediaArr.length > 0){
                                 	$("<button>平媒</button>").appendTo('#newsList');
                                 	$('#newsListTemplate').tmpl(flatMediaArr).appendTo('#newsList');
                                 }
                                 if(twitterArr && twitterArr.length > 0){
                                 	$("<button>Twitter</button>").appendTo('#newsList');
                                 	$('#newsListTemplate').tmpl(twitterArr).appendTo('#newsList');
                                 }
                                 if(snsArr && snsArr.length > 0){
                                 	$("<button>SNS</button>").appendTo('#newsList');
                                 	$('#newsListTemplate').tmpl(snsArr).appendTo('#newsList');
                                 }
                                 if(otherArr && otherArr.length > 0){
                                 	$("<button>其他</button>").appendTo('#newsList');
                                 	$('#newsListTemplate').tmpl(otherArr).appendTo('#newsList');
                                 }
                                 
                                 //设置是否加载更多的状态，false为已经获取完毕，不需要再加载
     							page.setLoadMoreFlag(list.length);
     							if(!page.getLoadMoreFlag()){
     								$(".loding_more").css("display", "none");
     							}
                             } else{
                             	page.setLoadMoreFlag(0);
     							if(!page.getLoadMoreFlag()){
     								$(".loding_more").css("display", "none");
     							}
                             }
                			}else{
                				alert(result.msg);
                			}
                      }
                  }
                 
              },
              error : function(XMLHttpRequest, textStatus, errorThrown) {
                   //alert('系统出现未知异常，请联系系统管理员！');
              }
          });
         callbackevent();
     }
     
     function callbackevent(){
         //玉玺添加的js，
         // 1. 开始：3个小按钮的特效：集合、收藏、分享
         $(".xi_space_s1").click(function(){
             // $(".allmask").show();
             // $(".share1").show();
             if($(this).find("img").attr('src')=="images/gongyong_ico11.png"){
                 $(this).find("img").attr("src","images/gongyong_icon1.png");
             }
             else{
                 $(this).find("img").attr("src","images/gongyong_ico11.png");
             }
         });
         $(".third_p").click(function(){
             // $(".allmask").hide();
             // $(".share1").hide();
             $(this).find("img").attr("src","images/gongyong_ico1.png");
         });

         $(".xi_space_s2").click(function(){
             if($(this).find("img").attr('src')=="images/gongyong_ico22.png"){
                 $(this).find("img").attr("src","images/gongyong_icon2.png");
             }
             else{
                 $(this).find("img").attr("src","images/gongyong_ico22.png");
             }
         });

         $(".xi_space_s3").click(function(){
             $(".allmask").show();
             $(".share1").show();
             $(".circle").hide();
             if($(this).find("img").attr('src')=="images/gongyong_ico3.png"){
                 $(this).find("img").attr("src","images/gongyong_icon3.png");
             }
             else{
                 $(this).find("img").attr("src","images/gongyong_ico3.png");
             }
         });
         $(".third_p").click(function(){
             $(".allmask").hide();
             $(".share1").hide();
             $(".circle").show();
             $(this).find("img").attr("src","images/gongyong_icon3.png");
         });

         $(".first_p").click(function(){
             $(".allmask").show();
             $(".txqq").show();
             $(".share1").hide();
         });
         $(".close1").click(function(){
             $(".allmask").hide();
             $(".txqq").hide();
         });

         $(".second_p").click(function(){
             $(".allmask").show();
             $(".txqq").show();
             $(".share1").hide();
         });
         $(".close1").click(function(){
             $(".allmask").hide();
             $(".txqq").hide();
         });

         //1. 结束：3个小按钮的特效：集合、收藏、分享

         $(".head03").click(function(){
             $(".xifanyizhong").show();
         });
         $(".index_list ").click(function(){
             $(".xifanyizhong").hide();
         });

         $(".margin_b").click(function(){
             $(this).addClass("active");
         });
         $(".margin_b").mouseout(function(){
             $(this).removeClass("active");
         });

     }
              
     function GetQueryString(name)
		{
			var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
			var r = window.location.search.substr(1).match(reg);
			if(r!=null)return  unescape(r[2]); return null;
		}
     
     function hmProxy(url, data, callback){
	    var prefix = localStorage.localIP;
     	$.ajax({
     		type: 'post',
     		url: prefix + url + '.json?message=' + JSON.stringify(data),
     		dataType: 'json',
     		success: callback
     	});
     }
     
     function loadMore(){
 		page.nextPage();
 		initArticles();
 	};
 	
 	//页面转成pdf
    function topdf(){
		$(".spac_footer").css("display", "none");
		event.preventDefault();  
        html2canvas(document.body, {  
            allowTaint: true,  
            taintTest: false,  
            onrendered: function(canvas) {  
                canvas.id = "mycanvas"; 
                var dataUrl = canvas.toDataURL('image/jpeg');
                var doc = new jsPDF();
        		doc.addImage(dataUrl, 'JPEG', 30, 10, 30, 300);
        		doc.save('output.pdf');
        		$(".spac_footer").css("display", "");
            }  
        });
	}
 	
 	
    function getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var seperator2 = ":";
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
                + " " + date.getHours() + seperator2 + date.getMinutes()
                + seperator2 + date.getSeconds();
        return currentdate;
    } 
     </script>

    
</head>

<body >
<div class="zzc" style="display: none" ></div>
<div id="container" class="container" style="height:auto; padding:0;background:url(images/specialTopic/special_bg.png) no-repeat;">
        <div class="row" style= "padding:0; margin:0;border-bottom:1px solid rgba(255,255,255, .3); background:none; padding:3% 0; " >
            <div class="col-xs-2" style=" width:12.5%;padding-left: 3%;padding-top:1%; margin-right:3%; "><a href="index.html" style="display:block; float:left; position:relative; width:68%; margin-left:4%; margin-top:11%;"><img src="images/gongyong_fh.png"  style="width:100%; " /></a></div>

    <div class="col-xs-6 resultTitTop" id="topicTitle"></div>
<div class="col-xs-2" style=" float:right; padding:0; padding-top:0.6%; width:8.85%;text-align:right;margin-right:1%;"><a href="searchOne.html"><img src="images/index_wz_ico4.png" style="width:80%"/></a></div>
    <div id="indexTranButton" class="col-xs-2" style=" float:right; padding:0; width:9%; margin-right:1%; margin-top:1%"><img src="images/index_wz_ico3.png" style="width:80%" /></div>
    
    </div>

    <!--p class="s_content" style="padding:3%;">${abstractInfo}</p-->
   <div class="searchResultUl">
	 <div class="searchResultLi"><span>关键词:</span><em id="keywords"></em><div class="clear"></div></div>
	 <div class="searchResultLi"><span>标签:</span><em id="relatekeywords"></em><div class="clear"></div></div>
	 <div class="searchResultLi"><span>起止时间:</span><em id="topictime"><span id="topicStrattime"></span>至<span id="topicEndtime"></span></em><div class="clear"></div>
	   
	  </div>
	 
	 <div class="clear"></div>
	</div>
	 <div class="searchDescribe">
自<span id="topicStrattime1"></span>至<span id="topicEndtime1"></span>，译见跨语言大数据分析处理平台监测<span id="topicTitle1"></span>事件，数据范围覆盖<span id="stationNum"></span>个国家地区，<span id="languageNum"></span>种语言，<span id="mediaNum"></span>个主流媒体，海外媒体关于<span id="topicTitle10"></span>报道共有<span id="subjectsNum"></span>篇，以Twitter为代表的社交媒体相关评论<span id="twitterNum"></span>条。</div>
</div>
<div class="echart">
<h3>1.国家报道数据分布</h3>
<div id="topicBar" style="height:400px;"></div>
  <p>
   对<span id="topicTitle2"></span>报道最多的依次是<span id="topicStation0"></span>（<span id="topicQuantity0"></span>）、<span id="topicStation1"></span>媒体（<span id="topicQuantity1"></span>）、<span id="topicStation2"></span>（<span id="topicQuantity2"></span>）、<span id="topicStation3"></span>（<span id="topicQuantity3"></span>）、<span id="topicStation4"></span>（<span id="topicQuantity4"></span>）等。
  </p>
</div>

<div class="echart">
  <h3>2.媒体资讯走势</h3>
  <div id="topicPie" style="height:400px;"></div>
  <p>
   自<span id="topicStrattime2"></span>至<span id="topicEndtime2"></span>，7日内全球各媒体对<span id="topicTitle3"></span>报道数据量从<span id="firstQuantity"></span>到<span id="LastQuantity"></span>。
  </p>
</div>

<div class="echart">
  <h3>3.媒体覆盖统计图</h3>
  <div id="mediachart" class="bubbles" style="height:400px; "></div>
  <p>
   对<span id="topicTitle4"></span>的报道，新闻媒体报道量占<span id="newmedia"></span>，论坛媒体报道量占<span id="forummedia"></span>，博客媒体报道量占<span id="bokemedis"></span>，Twitter报道量占<span id="twittermedia"></span>，平面媒体报道量占<span id="pingmianmedia"></span>。
  </p>
</div>

<div class="echart">
  <h3>4.多语言对比分析</h3>
  <div id="comparelanguage" style="height:400px; "></div>
  <p>
   对<span id="topicTitle5"></span><span id="languageTxt">的报道</span>
  </p>
</div>

<div class="echart">
  <h3>5.媒体报道数据分布</h3>
  <div id="mediaData" style="height:400px; "></div>
  <p>
   对<span id="topicTitle6"></span>报道最多的依次是<span id=mediasitename0></span>（<span id="mediaquantity0"></span>）、<span id="mediasitename1"></span>媒体（<span id="mediaquantity1"></span>）、<span id="mediasitename2"></span>（<span id="mediaquantity2"></span>）、<span id="mediasitename3"></span>（<span id="mediaquantity3"></span>）、<span id="mediasitename4"></span>（<span id="mediaquantity4"></span>）等。
  </p>
</div>

<div class="echart">
  <h3>6.全球资讯正负面信息比例</h3>
  <div id="topicside" style="height:400px; "></div>
  <p>
   对<span id="topicTitle7"></span>报道，全球主流媒体报道内容其中正面信息为<span id="positiverate"></span>，负面信息为<span id="negativerate"></span>。
  </p>
</div>

<div class="echart">
  <h3>7.关联关键词</h3>
  <div id="bubbles" class="bubbles" style="height:400px; "></div>
  <p>
   全球各媒体围绕<span id="topicTitle8"></span>报道展开的相关报道中关联的核心关键词分别为：<span id="relateKeywordsView"></span>。
  </p>
</div>

<div class="echart">
  <h3>8.观点分析</h3>
  <p >
  对<span id="topicTitle9"></span>的报道，全球主流媒体报道内容中正负面观点如下：
  </p>
  <div id="optionanysi">
	  <script id="topicPointsTemplate" type="text/x-jquery-tmpl">
  		<div class="xiguandian">
       		<dl>
         		<dd>${index}，${content}（${hot}）</dd>
       		</dl>
  		</div>
</script>
  </div>
</div>

<div class="echart" style="margin:0;border:0; padding-bottom:0;">
   <!-- <div class="margin_b">
   <h5 class="index_tit">Europe</h5>
			<h1 class="index_tit_b" >McGraw-Hill+ New Oriental Education Group, the United</h1>
			<div>
				<span class="index_tit_s">APP,Assoclated Press+1 more</span>
				<span class="sp_ico_r">
				<a class="index_space_s xi_space_s1"><img src="images/gongyong_icon1.png" /></a>
				<a class="index_space_s xi_space_s2"><img src="images/gongyong_icon2.png" /></a>
				<a class="index_space_s xi_space_s3 fenxiang"><img src="images/gongyong_icon3.png" /></a>
				</span>
                <div class="clear"></div>
			</div>
    </div> -->
    <div id="newsList" style="padding-top: 60px;"></div>
	<div class="loding" style="padding-bottom:5em;">
		<span id="loadMore" class="loding_more" onclick="loadMore();"><img src="images/morejian.png" style="width:auto; height:1em; margin-right:0.5em;" >Load more</span>
	</div>
   <script id="newsListTemplate" type="text/x-jquery-tmpl">
		<div class="margin_b">
			<h1 class="index_tit_b" onclick="window.location='information.html?topic_id=${topic_id}&uuid=${uuid}'">${title}</h1>
			<div>
				<span class="index_tit_s">${website_name}</span>
				<span class="sp_ico_r">
				<!--<a class="index_space_s xi_space_s1"><img src="images/gongyong_icon1.png" /></a>
				<a class="index_space_s xi_space_s2"><img src="images/gongyong_icon2.png" /></a>
				<a class="index_space_s xi_space_s3 fenxiang"><img src="images/gongyong_icon3.png" /></a>-->
				</span>
                <div class="clear"></div>
			</div>
		</div>
</script> 
    
</div>

<div  class="spac_footer">
			<a style="float:left;padding-left:20px;"><img src="images/specialTopic/spac_ico1.png"></a>
			<a href="#" style="text-align:center;"><img src="images/specialTopic/spac_ico2.png"></a>
			<a href="javascript:void(0);" style="float:right;padding-right:20px;" onclick="topdf();"><img src="images/specialTopic/spac_ico3.png"></a>
		</div>
		<div class="ximantansword">暂不提供人工翻译，如有需要请<br/>拨打我公司客服电话：4000000000<div class="arrow"></div></div>
		<div class="ximantansword2">Tap for human translation on this page<div class="arrow"></div></div>

</body>


<!-- <script src="js/jsondata-scatter.js"></script>-->
  <script src="js/myscatter.js"></script>
  <script type="text/javascript" src="js/jsPDF/iframe.js"></script>
</html>